import { createContext } from 'react';
import { FilePreview } from '.';

type VoidFunc = () => void;

type ImageUploaderTriggerContextType = {
  open: VoidFunc | null;
  file: FilePreview | null;
  setFile: ((file: FilePreview | null) => void) | null;
};

export const ImageUploaderTriggerContext =
  createContext<ImageUploaderTriggerContextType>({
    open: null,
    file: null,
    setFile: null,
  });
